@extends('admin.layout')
@section('body')

    <!-- 正文开始 -->
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">
                <!-- 表格工具栏 -->
                <form class="layui-form toolbar" id="formSearch">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">@lang('common.keyword'):</label>
                            <div class="layui-input-inline">
                                <input name="keyword" class="layui-input"
                                       placeholder="用户名、手机号"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">日期:</label>
                            @include('admin.widget.dateRange')
                        </div>
                        <div class="layui-inline">&emsp;
                            <button class="layui-btn icon-btn" lay-filter="searchForm" lay-submit>
                                <i class="iconfont icon-ic_search"></i>@lang('common.search')
                            </button>
                        </div>
                    </div>
                </form>
                <!-- 数据表格 -->
                <table id="adminTable" lay-filter="adminTable"></table>
            </div>
        </div>
    </div>
@stop

@push('script')
    <script type="text/javascript">
        layui.use(['layer', 'form', 'table', 'util', 'admin', 'laydate'], function () {
            var $ = layui.jquery, form = layui.form, laydate = layui.laydate;
            //加载完成
            var listTableInc = new ListTable("{{admin_url($baseRoute.'pager')}}");

            listTableInc.checkbox();
            listTableInc.lineNumber();
            listTableInc.column("@lang('common.id')", "id").setWidth(100);
            listTableInc.column("用户名", "username").setWidth(100);
            listTableInc.column("手机号", "mobile").setWidth(160);
            listTableInc.column("用户token", "token");
            listTableInc.column("IP", "ip").setWidth(110);
            listTableInc.column("登录时间", "created_at").setWithDateTime();
            listTableInc.render();

        });
    </script>
@endpush
